<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:75:"C:\phpstudy\WWW\tea\public/../application/recommended\view\index\index.html";i:1534239039;}*/ ?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit">

    <title>推荐管理</title>

    <meta name="keywords" content="">
    <meta name="description" content="">

    <!--[if lt IE 9]>
    <meta http-equiv="refresh" content="0;ie.html" />
    <![endif]-->

    <link rel="shortcut icon" href="favicon.ico"> <link href="/static/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="/static/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="/static/css/animate.css" rel="stylesheet">
    <link href="/static/css/style.css?v=4.1.0" rel="stylesheet">
    <style type="text/css">
        div{
            text-align: center;
        }
        th{
            text-align: center;
        }
        .fanye{
            text-align: center;
        }
        select:{
            width: auto;
            padding: 0;
            margin: 0;
        }
        select.form-control.m-b{
            text-align: center;
        }
        option{
            text-align: center;
        }
    </style>
</head>
<body>
    <div class="ibox-title">
        <h5 style="color: #f47;font-weight: bold;">热门搜索推荐</h5>
        <h6 style="color: #f47;">限定三个热门搜索（超过三个显示后三个）</h6>
    </div>

    <!-- 首页推荐 -->
    <div class="ibox-content ">
        <table class="table table-bordered ">
            <thead>
                <tr>
                    <th class="col-sm-1">推荐</th>
                    <th class="col-sm-1">榜单</th>
                    <th class="col-sm-1">茶类</th>
                    <th class="col-sm-1">产地</th>
                    <th class="col-sm-1">选择推荐</th>
                    <th class="col-sm-1"> 操作</th>
                </tr>
            </thead>
            <tbody>
                <?php if(!(empty($list) || (($list instanceof \think\Collection || $list instanceof \think\Paginator ) && $list->isEmpty()))): foreach($list as $l): ?>
                <form action="<?php echo url('updaterecommended'); ?>" method="post">
                <tr>
                    <td><?php echo $l['list']; ?></td>
                    <td>
                        <select class="form-control m-b" name="bangdan_id" value="" style="font-size: 12px; margin-bottom:0">
                        <?php foreach($resbandan as $bd): ?>
                        <option value="<?php echo $bd['id']; ?>" <?php if($l['bangdan_id'] == $bd['id']): ?>selected='selected'<?php endif; ?>><?php echo $bd['bdname']; ?></option>
                        <?php endforeach; ?>
                        </select>
                    </td>
                    <td>
                        <select class="form-control m-b" value="<?php echo $l['teacase_id']; ?>" name="teacase_id" style="font-size: 12px; margin-bottom:0">
                        <?php foreach($teacase as $case): ?>
                        <option value="<?php echo $case['id']; ?>" <?php if($l['teacase_id'] == $case['id']): ?>selected='selected'<?php endif; ?>><?php echo $case['teaname']; ?></option>
                        <?php endforeach; ?>
                        </select>
                    </td>
                    <td class="area">
                        <select class="form-control m-b " name="teaarea_id"  value="<?php echo $l['teaarea_id']; ?>" style="font-size: 12px; margin-bottom:0">
                        <option value="0">总榜</option>
                        <?php foreach($l['area'] as $ra): ?>
                        <option value="<?php echo $l['teaarea_id']; ?>" <?php if($ra['aid'] == $l['teaarea_id']): ?>selected='selected'<?php endif; ?>><?php echo $ra['aname']; ?></option>
                        <?php endforeach; ?>
                    </select>
                    </td>
                    <td>
                        <?php switch($l['list']): case "1": ?>
                            <span class="btn btn-danger" onclick="bottonmove('<?php echo $l['Id']; ?>','<?php echo $l['list']; ?>','<?php echo $l['head']; ?>')">下移</span>
                        <?php break; case "2": ?>
                            <span class="btn btn-success" onclick="topmove('<?php echo $l['Id']; ?>','<?php echo $l['list']; ?>','<?php echo $l['head']; ?>')">上移</span>
                            <span class="btn btn-danger" onclick="bottonmove('<?php echo $l['Id']; ?>','<?php echo $l['list']; ?>','<?php echo $l['head']; ?>')">下移</span>
                        <?php break; case "3": ?>
                            <span class="btn btn-success" onclick="topmove('<?php echo $l['Id']; ?>','<?php echo $l['list']; ?>','<?php echo $l['head']; ?>')">上移</span>
                        <?php break; endswitch; ?>
                    </td>
                    <input type="test" name="last_list" value="<?php echo $l['list']; ?>" style="display: none;">
                    <input type="text" name="id" value="<?php echo $l['Id']; ?>" style="display: none;">
                    <td>
                        <button class="btn btn-primary" id="s1" type="submit" >修改推荐</button>
                    </td>
                </tr>
                </form>
                <?php endforeach; endif; ?>
            </tbody>
        </table>
    </div>
 
    <!-- 1红茶 -->
    <div class="ibox-content ">
        <div style="font-weight: bold;color: #f47">红茶</div>
        <table class="table table-bordered ">
            <thead>
                <tr>
                    <th class="col-sm-1">推荐</th>
                    <th class="col-sm-1">榜单</th>
                    <th class="col-sm-1">产地</th>
                    <th class="col-sm-1">选择推荐</th>
                    <th class="col-sm-1"> 操作</th>
                </tr>
            </thead>
            <tbody>
                <?php if(!(empty($list1) || (($list1 instanceof \think\Collection || $list1 instanceof \think\Paginator ) && $list1->isEmpty()))): foreach($list1 as $l1): ?>
                <form action="<?php echo url('updaterecommended'); ?>" method="post">
                <tr>
                    <td><?php echo $l1['list']; ?></td>
                    <td>
                        <select class="form-control m-b" name="bangdan_id" value="" style="font-size: 12px; margin-bottom:0">
                        <?php foreach($resbandan as $bd): ?>
                        <option value="<?php echo $bd['id']; ?>" <?php if($l1['bangdan_id'] == $bd['id']): ?>selected='selected'<?php endif; ?>><?php echo $bd['bdname']; ?></option>
                        <?php endforeach; ?>
                        </select>
                    </td>
                    <td class="area">
                        <select class="form-control m-b " name="teaarea_id"  value="<?php echo $l1['teaarea_id']; ?>" style="font-size: 12px; margin-bottom:0">
                        <option value="0">总榜</option>
                        <?php foreach($l1['area'] as $ra): ?>
                        <option value="<?php echo $l1['teaarea_id']; ?>" <?php if($ra['aid'] == $l1['teaarea_id']): ?>selected='selected'<?php endif; ?>><?php echo $ra['aname']; ?></option>
                        <?php endforeach; ?>
                    </select>
                    </td>
                    <td>
                       <?php switch($l1['list']): case "1": ?>
                            <span class="btn btn-danger" onclick="bottonmove('<?php echo $l1['Id']; ?>','<?php echo $l1['list']; ?>','<?php echo $l1['head']; ?>')">下移</span>
                        <?php break; case "2": ?>
                            <span class="btn btn-success" onclick="topmove('<?php echo $l1['Id']; ?>','<?php echo $l1['list']; ?>','<?php echo $l1['head']; ?>')">上移</span>
                            <span class="btn btn-danger" onclick="bottonmove('<?php echo $l1['Id']; ?>','<?php echo $l1['list']; ?>','<?php echo $l1['head']; ?>')">下移</span>
                        <?php break; case "3": ?>
                            <span class="btn btn-success" onclick="topmove('<?php echo $l1['Id']; ?>','<?php echo $l1['list']; ?>','<?php echo $l1['head']; ?>')">上移</span>
                        <?php break; endswitch; ?>
                    </td>
                    <input type="test" name="teacase_id" value="<?php echo $l1['teacase_id']; ?>" style="display: none;">
                    <input type="test" name="last_list" value="<?php echo $l1['list']; ?>" style="display: none;">
                    <input type="text" name="id" value="<?php echo $l1['Id']; ?>" style="display: none;">
                    <td>
                        <button class="btn btn-primary" id="s1" type="submit" >修改推荐</button>
                    </td>
                </tr>
                </form>
                <?php endforeach; endif; ?>
                    <td colspan="5">
                        <span onclick="get_hot(1)" class="btn btn-primary" id="s1" type="submit" >获取热门排行</span>
                    </td>
            </tbody>
        </table>
    </div>
    
    <!-- 2绿茶 -->
    <div class="ibox-content ">
        <div style="font-weight: bold;color: green">绿茶</div>
        <table class="table table-bordered ">
            <thead>
                <tr>
                    <th class="col-sm-1">推荐</th>
                    <th class="col-sm-1">榜单</th>
                    <th class="col-sm-1">产地</th>
                    <th class="col-sm-1">选择推荐</th>
                    <th class="col-sm-1"> 操作</th>
                </tr>
            </thead>
            <tbody>
                <?php if(!(empty($list2) || (($list2 instanceof \think\Collection || $list2 instanceof \think\Paginator ) && $list2->isEmpty()))): foreach($list2 as $l2): ?>
                <form action="<?php echo url('updaterecommended'); ?>" method="post">
                <tr>
                    <td><?php echo $l2['list']; ?></td>
                    <td>
                        <select class="form-control m-b" name="bangdan_id" value="" style="font-size: 12px; margin-bottom:0">
                        <?php foreach($resbandan as $bd): ?>
                        <option value="<?php echo $bd['id']; ?>" <?php if($l2['bangdan_id'] == $bd['id']): ?>selected='selected'<?php endif; ?>><?php echo $bd['bdname']; ?></option>
                        <?php endforeach; ?>
                        </select>
                    </td>
                    <td class="area">
                        <select class="form-control m-b " name="teaarea_id"  value="<?php echo $l2['teaarea_id']; ?>" style="font-size: 12px; margin-bottom:0">
                        <option value="0">总榜</option>
                        <?php foreach($l2['area'] as $ra): ?>
                        <option value="<?php echo $l2['teaarea_id']; ?>" <?php if($ra['aid'] == $l2['teaarea_id']): ?>selected='selected'<?php endif; ?>><?php echo $ra['aname']; ?></option>
                        <?php endforeach; ?>
                    </select>
                    </td>
                    <td>
                        <?php switch($l2['list']): case "1": ?>
                            <span class="btn btn-danger" onclick="bottonmove('<?php echo $l2['Id']; ?>','<?php echo $l2['list']; ?>','<?php echo $l2['head']; ?>')">下移</span>
                        <?php break; case "2": ?>
                            <span class="btn btn-success" onclick="topmove('<?php echo $l2['Id']; ?>','<?php echo $l2['list']; ?>','<?php echo $l2['head']; ?>')">上移</span>
                            <span class="btn btn-danger" onclick="bottonmove('<?php echo $l2['Id']; ?>','<?php echo $l2['list']; ?>','<?php echo $l2['head']; ?>')">下移</span>
                        <?php break; case "3": ?>
                            <span class="btn btn-success" onclick="topmove('<?php echo $l2['Id']; ?>','<?php echo $l2['list']; ?>','<?php echo $l2['head']; ?>')">上移</span>
                        <?php break; endswitch; ?>
                    </td>
                    <input type="test" name="teacase_id" value="<?php echo $l1['teacase_id']; ?>" style="display: none;">
                    <input type="test" name="last_list" value="<?php echo $l2['list']; ?>" style="display: none;">
                    <input type="text" name="id" value="<?php echo $l2['Id']; ?>" style="display: none;">
                    <td>
                        <button class="btn btn-primary" id="s1" type="submit" >修改推荐</button>
                    </td>
                </tr>
                </form>
                <?php endforeach; endif; ?>
                <td colspan="5">
                        <span onclick="get_hot(2)" class="btn btn-primary" id="s1" type="submit" >获取热门排行</span>
                    </td>
            </tbody>
        </table>
    </div>
    
    <!-- 3白茶 -->
    <div class="ibox-content ">
        <div style="font-weight: bold;">白茶</div>
        <table class="table table-bordered ">
            <thead>
                <tr>
                    <th class="col-sm-1">推荐</th>
                    <th class="col-sm-1">榜单</th>
                    <th class="col-sm-1">产地</th>
                    <th class="col-sm-1">选择推荐</th>
                    <th class="col-sm-1"> 操作</th>
                </tr>
            </thead>
            <tbody>
                <?php if(!(empty($list3) || (($list3 instanceof \think\Collection || $list3 instanceof \think\Paginator ) && $list3->isEmpty()))): foreach($list3 as $l3): ?>
                <form action="<?php echo url('updaterecommended'); ?>" method="post">
                <tr>
                    <td><?php echo $l3['list']; ?></td>
                    <td>
                        <select class="form-control m-b" name="bangdan_id" value="" style="font-size: 12px; margin-bottom:0">
                        <?php foreach($resbandan as $bd): ?>
                        <option value="<?php echo $bd['id']; ?>" <?php if($l3['bangdan_id'] == $bd['id']): ?>selected='selected'<?php endif; ?>><?php echo $bd['bdname']; ?></option>
                        <?php endforeach; ?>
                        </select>
                    </td>
                    <td class="area">
                        <select class="form-control m-b " name="teaarea_id"  value="<?php echo $l3['teaarea_id']; ?>" style="font-size: 12px; margin-bottom:0">
                        <option value="0">总榜</option>
                        <?php foreach($l3['area'] as $ra): ?>
                        <option value="<?php echo $l3['teaarea_id']; ?>" <?php if($ra['aid'] == $l3['teaarea_id']): ?>selected='selected'<?php endif; ?>><?php echo $ra['aname']; ?></option>
                        <?php endforeach; ?>
                    </select>
                    </td>
                    <td>
                        <?php switch($l3['list']): case "1": ?>
                            <span class="btn btn-danger" onclick="bottonmove('<?php echo $l3['Id']; ?>','<?php echo $l3['list']; ?>','<?php echo $l3['head']; ?>')">下移</span>
                        <?php break; case "2": ?>
                            <span class="btn btn-success" onclick="topmove('<?php echo $l3['Id']; ?>','<?php echo $l3['list']; ?>','<?php echo $l3['head']; ?>')">上移</span>
                            <span class="btn btn-danger" onclick="bottonmove('<?php echo $l3['Id']; ?>','<?php echo $l3['list']; ?>','<?php echo $l3['head']; ?>')">下移</span>
                        <?php break; case "3": ?>
                            <span class="btn btn-success" onclick="topmove('<?php echo $l3['Id']; ?>','<?php echo $l3['list']; ?>','<?php echo $l3['head']; ?>')">上移</span>
                        <?php break; endswitch; ?>
                    </td>
                    <input type="test" name="teacase_id" value="<?php echo $l1['teacase_id']; ?>" style="display: none;">
                    <input type="test" name="last_list" value="<?php echo $l3['list']; ?>" style="display: none;">
                    <input type="text" name="id" value="<?php echo $l3['Id']; ?>" style="display: none;">
                    <td>
                        <button class="btn btn-primary" id="s1" type="submit" >修改推荐</button>
                    </td>
                </tr>
                </form>
                <?php endforeach; endif; ?>
                <td colspan="5">
                        <span onclick="get_hot(3)" class="btn btn-primary" id="s1" type="submit" >获取热门排行</span>
                    </td>
            </tbody>
        </table>
    </div>
    
    <!-- 4普洱茶 -->
    <div class="ibox-content ">
        <div style="font-weight: bold;">普洱茶</div>
        <table class="table table-bordered ">
            <thead>
                <tr>
                    <th class="col-sm-1">推荐</th>
                    <th class="col-sm-1">榜单</th>
                    <th class="col-sm-1">产地</th>
                    <th class="col-sm-1">选择推荐</th>
                    <th class="col-sm-1"> 操作</th>
                </tr>
            </thead>
            <tbody>
                <?php if(!(empty($list4) || (($list4 instanceof \think\Collection || $list4 instanceof \think\Paginator ) && $list4->isEmpty()))): foreach($list4 as $l4): ?>
                <form action="<?php echo url('updaterecommended'); ?>" method="post">
                <tr>
                    <td><?php echo $l4['list']; ?></td>
                    <td>
                        <select class="form-control m-b" name="bangdan_id" value="" style="font-size: 12px; margin-bottom:0">
                        <?php foreach($resbandan as $bd): ?>
                        <option value="<?php echo $bd['id']; ?>" <?php if($l4['bangdan_id'] == $bd['id']): ?>selected='selected'<?php endif; ?>><?php echo $bd['bdname']; ?></option>
                        <?php endforeach; ?>
                        </select>
                    </td>
                    <td class="area">
                        <select class="form-control m-b " name="teaarea_id"  value="<?php echo $l4['teaarea_id']; ?>" style="font-size: 12px; margin-bottom:0">
                        <option value="0">总榜</option>
                        <?php foreach($l4['area'] as $ra): ?>
                        <option value="<?php echo $l4['teaarea_id']; ?>" <?php if($ra['aid'] == $l4['teaarea_id']): ?>selected='selected'<?php endif; ?>><?php echo $ra['aname']; ?></option>
                        <?php endforeach; ?>
                    </select>
                    </td>
                    <td>
                        <?php switch($l4['list']): case "1": ?>
                            <span class="btn btn-danger" onclick="bottonmove('<?php echo $l4['Id']; ?>','<?php echo $l4['list']; ?>','<?php echo $l4['head']; ?>')">下移</span>
                        <?php break; case "2": ?>
                            <span class="btn btn-success" onclick="topmove('<?php echo $l4['Id']; ?>','<?php echo $l4['list']; ?>','<?php echo $l4['head']; ?>')">上移</span>
                            <span class="btn btn-danger" onclick="bottonmove('<?php echo $l4['Id']; ?>','<?php echo $l4['list']; ?>','<?php echo $l4['head']; ?>')">下移</span>
                        <?php break; case "3": ?>
                            <span class="btn btn-success" onclick="topmove('<?php echo $l4['Id']; ?>','<?php echo $l4['list']; ?>','<?php echo $l4['head']; ?>')">上移</span>
                        <?php break; endswitch; ?>
                    </td>
                    <input type="test" name="teacase_id" value="<?php echo $l1['teacase_id']; ?>" style="display: none;">
                    <input type="test" name="last_list" value="<?php echo $l4['list']; ?>" style="display: none;">
                    <input type="text" name="id" value="<?php echo $l4['Id']; ?>" style="display: none;">
                    <td>
                        <button class="btn btn-primary" id="s1" type="submit" >修改推荐</button>
                    </td>
                </tr>
                </form>
                <?php endforeach; endif; ?>
                <td colspan="5">
                        <span onclick="get_hot(4)" class="btn btn-primary" id="s1" type="submit" >获取热门排行</span>
                    </td>
            </tbody>
        </table>
    </div>
    
    <!-- 5乌龙茶 -->
    <div class="ibox-content ">
        <div style="font-weight: bold;">乌龙茶</div>
        <table class="table table-bordered ">
            <thead>
                <tr>
                    <th class="col-sm-1">推荐</th>
                    <th class="col-sm-1">榜单</th>
                    <th class="col-sm-1">产地</th>
                    <th class="col-sm-1">选择推荐</th>
                    <th class="col-sm-1"> 操作</th>
                </tr>
            </thead>
            <tbody>
                <?php if(!(empty($list5) || (($list5 instanceof \think\Collection || $list5 instanceof \think\Paginator ) && $list5->isEmpty()))): foreach($list5 as $l5): ?>
                <form action="<?php echo url('updaterecommended'); ?>" method="post">
                <tr>
                    <td><?php echo $l5['list']; ?></td>
                    <td>
                        <select class="form-control m-b" name="bangdan_id" value="" style="font-size: 12px; margin-bottom:0">
                        <?php foreach($resbandan as $bd): ?>
                        <option value="<?php echo $bd['id']; ?>" <?php if($l5['bangdan_id'] == $bd['id']): ?>selected='selected'<?php endif; ?>><?php echo $bd['bdname']; ?></option>
                        <?php endforeach; ?>
                        </select>
                    </td>
                    <td class="area">
                        <select class="form-control m-b " name="teaarea_id"  value="<?php echo $l5['teaarea_id']; ?>" style="font-size: 12px; margin-bottom:0">
                        <option value="0">总榜</option>
                        <?php foreach($l5['area'] as $ra): ?>
                        <option value="<?php echo $l5['teaarea_id']; ?>" <?php if($ra['aid'] == $l5['teaarea_id']): ?>selected='selected'<?php endif; ?>><?php echo $ra['aname']; ?></option>
                        <?php endforeach; ?>
                    </select>
                    </td>
                    <td>
                        <?php switch($l5['list']): case "1": ?>
                            <span class="btn btn-danger" onclick="bottonmove('<?php echo $l5['Id']; ?>','<?php echo $l5['list']; ?>','<?php echo $l5['head']; ?>')">下移</span>
                        <?php break; case "2": ?>
                            <span class="btn btn-success" onclick="topmove('<?php echo $l5['Id']; ?>','<?php echo $l5['list']; ?>','<?php echo $l5['head']; ?>')">上移</span>
                            <span class="btn btn-danger" onclick="bottonmove('<?php echo $l5['Id']; ?>','<?php echo $l5['list']; ?>','<?php echo $l5['head']; ?>')">下移</span>
                        <?php break; case "3": ?>
                            <span class="btn btn-success" onclick="topmove('<?php echo $l5['Id']; ?>','<?php echo $l5['list']; ?>','<?php echo $l5['head']; ?>')">上移</span>
                        <?php break; endswitch; ?>
                    </td>
                    <input type="test" name="teacase_id" value="<?php echo $l1['teacase_id']; ?>" style="display: none;">
                    <input type="test" name="last_list" value="<?php echo $l5['list']; ?>" style="display: none;">
                    <input type="text" name="id" value="<?php echo $l5['Id']; ?>" style="display: none;">
                    <td>
                        <button class="btn btn-primary" id="s1" type="submit" >修改推荐</button>
                    </td>
                </tr>
                </form>
                <?php endforeach; endif; ?>
                <td colspan="5">
                        <span onclick="get_hot(5)" class="btn btn-primary" id="s1" type="submit" >获取热门排行</span>
                    </td>
            </tbody>
        </table>
    </div>

    <!-- 6黑茶 -->
    <div class="ibox-content ">
        <div style="font-weight: bold;">黑茶</div>
        <table class="table table-bordered ">
            <thead>
                <tr>
                    <th class="col-sm-1">推荐</th>
                    <th class="col-sm-1">榜单</th>
                    <th class="col-sm-1">产地</th>
                    <th class="col-sm-1">选择推荐</th>
                    <th class="col-sm-1"> 操作</th>
                </tr>
            </thead>
            <tbody>
                <?php if(!(empty($list6) || (($list6 instanceof \think\Collection || $list6 instanceof \think\Paginator ) && $list6->isEmpty()))): foreach($list6 as $l6): ?>
                <form action="<?php echo url('updaterecommended'); ?>" method="post">
                <tr>
                    <td><?php echo $l6['list']; ?></td>
                    <td>
                        <select class="form-control m-b" name="bangdan_id" value="" style="font-size: 12px; margin-bottom:0">
                        <?php foreach($resbandan as $bd): ?>
                        <option value="<?php echo $bd['id']; ?>" <?php if($l6['bangdan_id'] == $bd['id']): ?>selected='selected'<?php endif; ?>><?php echo $bd['bdname']; ?></option>
                        <?php endforeach; ?>
                        </select>
                    </td>
                    <td class="area">
                        <select class="form-control m-b " name="teaarea_id"  value="<?php echo $l6['teaarea_id']; ?>" style="font-size: 12px; margin-bottom:0">
                        <option value="0">总榜</option>
                        <?php foreach($l6['area'] as $ra): ?>
                        <option value="<?php echo $l6['teaarea_id']; ?>" <?php if($ra['aid'] == $l6['teaarea_id']): ?>selected='selected'<?php endif; ?>><?php echo $ra['aname']; ?></option>
                        <?php endforeach; ?>
                    </select>
                    </td>
                    <td>
                        <?php switch($l6['list']): case "1": ?>
                            <span class="btn btn-danger" onclick="bottonmove('<?php echo $l6['Id']; ?>','<?php echo $l6['list']; ?>','<?php echo $l6['head']; ?>')">下移</span>
                        <?php break; case "2": ?>
                            <span class="btn btn-success" onclick="topmove('<?php echo $l6['Id']; ?>','<?php echo $l6['list']; ?>','<?php echo $l6['head']; ?>')">上移</span>
                            <span class="btn btn-danger" onclick="bottonmove('<?php echo $l6['Id']; ?>','<?php echo $l6['list']; ?>','<?php echo $l6['head']; ?>')">下移</span>
                        <?php break; case "3": ?>
                            <span class="btn btn-success" onclick="topmove('<?php echo $l6['Id']; ?>','<?php echo $l6['list']; ?>','<?php echo $l6['head']; ?>')">上移</span>
                        <?php break; endswitch; ?>
                    </td>
                    <input type="test" name="teacase_id" value="<?php echo $l1['teacase_id']; ?>" style="display: none;">
                    <input type="test" name="last_list" value="<?php echo $l6['list']; ?>" style="display: none;">
                    <input type="text" name="id" value="<?php echo $l6['Id']; ?>" style="display: none;">
                    <td>
                        <button class="btn btn-primary" id="s1" type="submit" >修改推荐</button>
                    </td>
                </tr>
                </form>
                <?php endforeach; endif; ?>
                    <td colspan="5">
                        <span onclick="get_hot(6)" class="btn btn-primary" id="s1" type="submit" >获取热门排行</span>
                    </td>
            </tbody>
        </table>
    </div>
    
    
<!-- 全局js -->
<script src="/static/js/jquery.min.js?v=2.1.4"></script>
<script src="/static/js/bootstrap.min.js?v=3.3.6"></script>
<script src="/static/js/plugins/metisMenu/jquery.metisMenu.js"></script>
<script src="/static/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
<script src="/static/js/plugins/layer/layer.min.js"></script>

<!-- 自定义js -->
<script src="/static/js/hAdmin.js?v=4.1.0"></script>
<script type="text/javascript" src="/static/js/index.js"></script>

<!-- 第三方插件 -->
<script src="/static/js/plugins/pace/pace.min.js"></script>
<script type="text/javascript">
    $("select[name=teacase_id]").change(function(){
        var val = $(this).find("option:selected").attr("value");
        var area = $(this).parent().parent().find('.area').find('select[name=teaarea_id]');
        var url="<?php echo url('reTeaAreaJson'); ?>";
        $.post(url, {teacase_id:val},function(data){
            var areas = JSON.parse(data);
            var option="<option value='0'>总榜</option>";
            for(var index in areas){
                // console.log(areas[index]["area"])
                var a = "<option value="+areas[index]['id']+">"+areas[index]['area']+"</option>"
                option +=a
            }
            // console.log(area);
            area.html("")
            area.html(option)
        })
    })
    function topmove(id,list,head){
        var url="<?php echo url('update_top_list'); ?>";
        // console.log(id+","+list+","+head)
        $.post(url,{list:list,id:id,head:head},function(data){
            if(data==1){
                location.reload()
            }
        })   
    }
    function bottonmove(id,list,head){
        var url="<?php echo url('update_botton_list'); ?>";
        // console.log(id+","+list+","+head)
        $.post(url,{list:list,id:id,head:head},function(data){
            if(data==1){
                location.reload()
            }
        })   
    }
    function get_hot(id){
        var url = "<?php echo url('get_hot_array'); ?>";
        $.post(url,{teacase_id:id},function(data){
            if(data==1){
                location.reload()
            }else{
                alert("获取失败");
            }
        })
    }
    // $('select[name=list]').change(function(){
    //     var url="<?php echo url('updatelist'); ?>";
    //     var val = $(this).find("option:selected").attr("value");
    //     var id = $(this).attr('data-id');
    //     $.post(url, {list:val,id:id},function(data){
    //         if(data==1){
    //             location.reload()
    //         }
    //     })
    // })
</script>

</body>
</html>